import request from "@/utils/request"

const perfix = "/stu"


// 获取学生列表
export const getstudentList = (data) => {
  return request({
    url: `${perfix}/list`,
    method: "post",
    data
  })
}

// 修改学生
export const updateStudent = (data) => {
  return request({
    url: `${perfix}/updateStudent`,
    method: "post",
    data
  })
}

// 删除学生
export const delStudent = (id) => {
  return request({
    url: `${perfix}/delStudent?id=${id}`,
    method: "delete"
  })
}

// 添加学生
export const addStudent = (data) => {
  return request({
    url: `${perfix}/save`,
    method: "post",
    data
  })
}

